package cn.hc.share.service;

import java.util.List;
import java.util.Map;

import cn.hc.share.entity.Article;
import cn.hc.share.entity.ArticleMsg;
import cn.hc.share.entity.Comment;

/**
 * 业务层接口
 */
public interface ArticleService extends BaseService
{

	public Article saveArticle(String articleId, String authorId, String title, String cont, String menuId,
			String tagIds, String category);

	public Article findDraft(String authorId);

	public List<Article> getArticles(String menuId, String tagId, String title, String page_, String pageSize_);

	// 根据文章id获取文章
	public Article getArticleById(String id);
	
	//获取文章总数
	public int getArticlesCount(String menuId, String tagId, String title);

	// 获取某一篇文章收藏/有用/无用信息
	public ArticleMsg getArticleMsgSuspend(String articleId, String author);

	//更新信息
	public ArticleMsg updateArticleMsg(String articleId, String author, String collectState, String usefullState);
	
	//统计有用/无用数量
	public Map<String, Integer> countArticleMsg(String articleId);

	//访问量+1
	public int addVisitArticle(String articleId);

	//统计评论数量
	public int statistCommentsNum(String articleId);

}
